package com.zhuobowen.warehouse.domain.bo;

import com.zhuobowen.warehouse.domain.ExportBill;
import com.zhuobowen.common.mybatis.core.domain.BaseEntity;
import com.zhuobowen.common.core.validate.AddGroup;
import com.zhuobowen.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import java.util.List;

/**
 * 出库单业务对象 wms_export_bill
 *
 * @author zbw
 * @date 2025-01-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ExportBill.class, reverseConvertGenerate = false)
public class ExportBillBo extends BaseEntity {

    /**
     * id
     */
    @NotBlank(message = "id不能为空", groups = { EditGroup.class })
    private String id;

    /**
     * 出库单名称
     */
    @NotBlank(message = "出库单名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 客户
     */
    @NotBlank(message = "客户不能为空", groups = { AddGroup.class, EditGroup.class })
    private String customer;

    /**
     * 出库日期
     */
    @NotNull(message = "出库日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date exportDate;

    /**
     * 出库编号
     */
    private String code;

    /**
     * 负责人
     */
    @NotBlank(message = "负责人不能为空", groups = { AddGroup.class, EditGroup.class })
    private String charge;

    /**
     * 公司
     */
    @NotBlank(message = "公司不能为空", groups = { AddGroup.class, EditGroup.class })
    private String company;

    /**
     * 明细
     */
    private List<ExportBillDetailBo> details;


}
